34 Commits

Author SHA1 Message Date
Sybren A. Stüvel
ef2bbd2845 Unified Command field names
Some parts of Flamenco had a Command consist of "name + settings", and
other parts used "type + parameters" (with the same semantics). This is
now unified to "name + parameters".
2022-02-21 18:03:51 +01:00
Sybren A. Stüvel
1756369b70 Cleanup: add comments 2022-02-21 15:41:00 +01:00
Sybren A. Stüvel
bb53cc1e4a Task log storage service 2022-02-18 18:19:35 +01:00
Sybren A. Stüvel
77c5650665 Cleanup: move imports to the right place 2022-02-18 17:25:20 +01:00
Sybren A. Stüvel
5b4625b5f9 Rename logging.go to zerolog.go 2022-02-18 11:58:18 +01:00
Sybren A. Stüvel
399c8af750 Correctly handle workers assigned to tasks + simple task updates 2022-02-17 17:30:52 +01:00
Sybren A. Stüvel
31e39e2137 Cleanup: remove fmt.Sprintf from sendAPIError calls 2022-02-17 17:30:27 +01:00
Sybren A. Stüvel
0ab8151a92 Move code out of main.go and add better check for OpenAPI paths 2022-02-17 13:58:10 +01:00
Sybren A. Stüvel
270c54fdb7 More status change acks & checks to get stable flow between worker states 2022-02-15 17:46:37 +01:00
Sybren A. Stüvel
c4df62d5d4 Start of sending task updates to Manager
This includes a mocking framework for unittests.
2022-02-15 15:58:24 +01:00
Sybren A. Stüvel
93517549b0 Manager: actually return worker state in /api/worker/state endpoint 2022-02-15 15:56:38 +01:00
Sybren A. Stüvel
50088b4c94 Save worker info on sign-on (not just on registration) 2022-02-15 10:57:29 +01:00
Sybren A. Stüvel
4aafb782ac Scheduler: Assign task to worker 2022-02-14 17:47:26 +01:00
Sybren A. Stüvel
3ffef34690 Allow sendAPIError() to be used like fmt.Sprintf 2022-02-14 16:53:40 +01:00
Sybren A. Stüvel
eea219c3e2 Move task scheduler into persistence layer 2022-02-14 16:53:21 +01:00
Sybren A. Stüvel
a9790ec579 API: return job from DB instead of authored job
The authored job has tasks & commands in there, which shouldn't be sent
as-is as an API response. Marshalling the task pointers for the
inter-task dependencies would potentially produce quite large responses.
2022-02-14 15:03:17 +01:00
Sybren A. Stüvel
8063a3e169 Cleanup: remove unused code 2022-02-01 16:22:21 +01:00
Sybren A. Stüvel
e598397ba4 Persistence: move some DB to API struct conversion to API implementation 2022-02-01 16:22:10 +01:00
Sybren A. Stüvel
2ca8858c28 Only update status field in DB when worker changes status 2022-02-01 10:16:10 +01:00
Sybren A. Stüvel
be89349632 Very basic non-functional framework for a task runner
Also has some login/logout functionality for storing stuff in the DB.
2022-01-31 16:05:27 +01:00
Sybren A. Stüvel
d3071146da Better logging of worker info 2022-01-31 15:35:57 +01:00
Sybren A. Stüvel
d880f7e7f0 Worker authentication is working 2022-01-31 15:27:13 +01:00
Sybren A. Stüvel
7c14b2648d Much more of the Worker life cycle implemented 2022-01-31 15:02:05 +01:00
Sybren A. Stüvel
c501899185 Ported lots of stuff from gitlab.com/dr.sybren/flamenco-worker-go
Much isn't working though.
2022-01-28 17:02:50 +01:00
Sybren A. Stüvel
28a56f3d91 Store workers in database when registering 2022-01-28 15:31:39 +01:00
Sybren A. Stüvel
b446b02739 Change package URL
Change package URL from `gitlab.com/blender/flamenco-goja-test` to
`gitlab.com/blender/flamenco-ng-poc` so that it matches the actual URL
on Gitlab.
2022-01-24 14:28:00 +01:00
Sybren A. Stüvel
6aed4e71ff Check for valid UUIDs; probably a good idea to write some validator for this 2022-01-11 18:45:09 +01:00
Sybren A. Stüvel
54933d0262 API: add Fetch Job endpoint
This is made with plain sqlite. It's probably a good idea to move to
something like GORM instead.
2022-01-11 18:38:14 +01:00
Sybren A. Stüvel
f0ae7d33e9 Connect API, job compiler, and persistence layer 2022-01-11 18:07:34 +01:00
Sybren A. Stüvel
d0fafb5063 Make the GET /api/jobs/types endpoint work 2022-01-10 17:45:20 +01:00
Sybren A. Stüvel
6520dc2d66 Fix some linter warnings
No functional changes.
2022-01-10 17:45:14 +01:00
Sybren A. Stüvel
b605330c57 API for getting supported job types from the Manager
Not yet hooked up to the job compiler, only reports one hard-coded job
type.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
7728c072ae Add copyright notices
No functional changes.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
f43673aaa7 Move the API implementation to the internal package
The server implementation is private, not something that's suitable for
reuse.
2022-01-10 17:45:13 +01:00