mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
plumb all config fields into task
the mqs are storing a models.Task, which was not incorporating all the fields that are in a task.Config. I would very much like to merge these two things, but expect to do this in a future restructuring as both are used widely and not cordoned off properly (Config has a channel, stdin, stdout, stderr -- and isn't just a 'config', so to speak, as Task is). Since a task.Config is what is used to actually run a container, the result of the aforementioned deficiency was #193 where tasks are improperly configured and ran (namely, memory wrong). async tasks can still not be hot, they will be reverted to default format. would also like to fix this (also part of restructuring). I actually started doing this, hence the changes to those files (the surface area of the change is small and discourages improper future use, so I've left what I've done). this will: closes #193 closes #195 closes #154 removes many unused fields in models.Task, since we have not implemented retries. priority & delay are left, even though they are not used either, the main goal of this is to resolve #193 and both these fields are strongly plumbed into all the mqs, so punting on those two.
This commit is contained in:
@@ -2,9 +2,9 @@ package models
|
||||
|
||||
import "context"
|
||||
|
||||
// Titan uses a Message Queue to impose a total ordering on jobs that it will
|
||||
// Message Queue is used to impose a total ordering on jobs that it will
|
||||
// execute in order. Tasks are added to the queue via the Push() interface. The
|
||||
// MQ must support a reserve-delete 2 step dequeue to allow Titan to implement
|
||||
// MQ must support a reserve-delete 2 step dequeue to allow implementing
|
||||
// timeouts and retries.
|
||||
//
|
||||
// The Reserve() operation must return a job based on this total ordering
|
||||
@@ -29,7 +29,7 @@ import "context"
|
||||
type MessageQueue interface {
|
||||
// Push a Task onto the queue. If any error is returned, the Task SHOULD not be
|
||||
// queued. Note that this does not completely avoid double queueing, that is
|
||||
// OK, Titan will perform a check against the datastore after a dequeue.
|
||||
// OK, a check against the datastore will be performed after a dequeue.
|
||||
//
|
||||
// If the job's Delay value is > 0, the job should NOT be enqueued. The job
|
||||
// should only be available in the queue after at least Delay seconds have
|
||||
|
||||
Reference in New Issue
Block a user