Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flamenco-worker-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
flamenco-worker-python
Commits
84d4be3d
Commit
84d4be3d
authored
8 years ago
by
Sybren A. Stüvel
Browse files
Options
Downloads
Patches
Plain Diff
Manager: added comments in golang style
parent
a5b0efc7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/flamenco-manager-go/src/flamenco-manager/flamenco/documents.go
+15
-9
15 additions, 9 deletions
...nco-manager-go/src/flamenco-manager/flamenco/documents.go
with
15 additions
and
9 deletions
packages/flamenco-manager-go/src/flamenco-manager/flamenco/documents.go
+
15
−
9
View file @
84d4be3d
...
...
@@ -6,11 +6,13 @@ import (
"gopkg.in/mgo.v2/bson"
)
// Command is an executable part of a Task
type
Command
struct
{
Name
string
`bson:"name" json:"name"`
Settings
bson
.
M
`bson:"settings" json:"settings"`
}
// Task contains a Flamenco task, with some BSON-only fields for local Manager use.
type
Task
struct
{
ID
bson
.
ObjectId
`bson:"_id,omitempty" json:"_id,omitempty"`
Etag
string
`bson:"_etag,omitempty" json:"_etag,omitempty"`
...
...
@@ -35,15 +37,16 @@ type Task struct {
}
type
aggregationPipelineResult
struct
{
// For internal MongoDB querying only
Task
*
Task
`bson:"task"`
}
//
D
ependency graph response from Server.
//
ScheduledTasks contains a d
ependency graph response from Server.
type
ScheduledTasks
struct
{
Depsgraph
[]
Task
`json:"depsgraph"`
}
//
B
oth sent from Worker to Manager, as well as from Manager to Server.
//
TaskUpdate is b
oth sent from Worker to Manager, as well as from Manager to Server.
type
TaskUpdate
struct
{
ID
bson
.
ObjectId
`bson:"_id" json:"_id"`
TaskID
bson
.
ObjectId
`bson:"task_id" json:"task_id,omitempty"`
...
...
@@ -57,13 +60,14 @@ type TaskUpdate struct {
Worker
string
`bson:"worker" json:"worker"`
}
//
R
eceived from Server.
//
TaskUpdateResponse is r
eceived from Server.
type
TaskUpdateResponse
struct
{
ModifiedCount
int
`json:"modified_count"`
HandledUpdateIds
[]
bson
.
ObjectId
`json:"handled_update_ids,omitempty"`
CancelTasksIds
[]
bson
.
ObjectId
`json:"cancel_task_ids,omitempty"`
}
// WorkerRegistration is sent by the Worker to register itself at this Manager.
type
WorkerRegistration
struct
{
Secret
string
`json:"secret"`
Platform
string
`json:"platform"`
...
...
@@ -71,6 +75,8 @@ type WorkerRegistration struct {
Nickname
string
`json:"nickname"`
}
// Worker contains all information about a specific Worker.
// Some fields come from the WorkerRegistration, whereas others are filled by us.
type
Worker
struct
{
ID
bson
.
ObjectId
`bson:"_id,omitempty" json:"_id,omitempty"`
Secret
string
`bson:"-" json:"-"`
...
...
@@ -85,10 +91,8 @@ type Worker struct {
SupportedJobTypes
[]
string
`bson:"supported_job_types" json:"supported_job_types"`
}
/**
* Notification sent to upstream Flamenco Server upon startup. This is a combination
* of settings (see settings.go) and information from the database.
*/
// StartupNotification sent to upstream Flamenco Server upon startup. This is a combination
// of settings (see settings.go) and information from the database.
type
StartupNotification
struct
{
// Settings
ManagerURL
string
`json:"manager_url"`
...
...
@@ -98,17 +102,19 @@ type StartupNotification struct {
NumberOfWorkers
int
`json:"nr_of_workers"`
}
// MayKeepRunningResponse is sent to workers to indicate whether they can keep running their task.
type
MayKeepRunningResponse
struct
{
MayKeepRunning
bool
`json:"may_keep_running"`
Reason
string
`json:"reason,omitempty"`
}
// Settings we want to be able to update from
within Flamenco Manager itself,
// so those are stored in MongoDB
itself
.
// Settings
InMongo contains settings
we want to be able to update from
//
within Flamenco Manager itself,
so those are stored in MongoDB.
type
SettingsInMongo
struct
{
DepsgraphLastModified
*
string
`bson:"depsgraph_last_modified"`
}
// StatusReport is sent in response to a query on the / URL.
type
StatusReport
struct
{
NrOfWorkers
int
`json:"nr_of_workers"`
NrOfTasks
int
`json:"nr_of_tasks"`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment