Commit 05c95a4cd9a106d8b30994daece8a2e102fb721f
1 parent
0e094231
Exists in
dev
cleanup models.Command
Showing
1 changed file
with
6 additions
and
14 deletions
Show diff stats
src/common/models.py
... | ... | @@ -403,33 +403,25 @@ class Command(models.Model): |
403 | 403 | # Sender and Recipient agents |
404 | 404 | sender = models.CharField(max_length=50, help_text='sender agent name', null=False) |
405 | 405 | recipient = models.CharField(max_length=50, help_text='recipient agent name', null=False) |
406 | - # Other agent (than sender or recipient) that set this command to KILLED or EXPIRED | |
407 | - killer_agent_name = models.CharField(max_length=50, help_text='sender agent name', null=True) | |
408 | 406 | name = models.CharField(max_length=400, help_text='command name', null=False) |
409 | 407 | validity_duration = models.PositiveIntegerField('(in sec)', default=COMMANDS_VALIDITY_DURATION_SEC_DEFAULT) |
410 | 408 | #state = models.CharField(choices = CMD_STATUS_CODES, default=CMD_STATUS_CODES.CMD_PENDING, max_length=20) |
411 | 409 | state = models.CharField(choices = CMD_STATUS_CODES, default=CMD_STATUS_CODES.CMD_PENDING, max_length=20) |
412 | 410 | #state = models.IntegerField(choices=CMD_STATUS_CODES, default=RSCODE_PENDING) |
411 | + # TODO: maybe à mettre au format json (key:value) | |
412 | + result = models.CharField(max_length=400, blank=True) | |
413 | 413 | |
414 | - # (AUTO on create) Automatically set at table line creation (line created by the sender) | |
414 | + # on creation: (AUTO) Automatically set at table line creation (line created by the sender) | |
415 | 415 | s_deposit_time = models.DateTimeField(blank=True, null=True, auto_now_add=True) |
416 | - # Set by the recipient : | |
417 | 416 | # - on reading: |
418 | 417 | r_read_time = models.DateTimeField(null=True) |
419 | 418 | # - on launching: |
420 | - #r_start_time = models.DateTimeField(null=True) | |
421 | 419 | r_start_time = models.DateTimeField(null=True) |
422 | - # - on skipping (because idle): | |
423 | - end_time = models.DateTimeField(null=True) | |
424 | - # - on expiration (because too old): | |
425 | - #expired_time = models.DateTimeField(null=True) | |
426 | - # - after kill or execution or expiration: | |
427 | - #r_processed_time = models.DateTimeField(null=True) | |
428 | - #end_time = models.DateTimeField(null=True) | |
420 | + # - on skipping (because idle), expiration (because too old), kill, or end of execution | |
429 | 421 | end_time = models.DateTimeField(null=True) |
430 | 422 | |
431 | - # TODO: maybe à mettre au format json (key:value) | |
432 | - result = models.CharField(max_length=400, blank=True) | |
423 | + # Other agent (than sender or recipient) that set this command to KILLED or EXPIRED | |
424 | + killer_agent_name = models.CharField(max_length=50, help_text='sender agent name', null=True) | |
433 | 425 | |
434 | 426 | class Meta: |
435 | 427 | managed = True | ... | ... |