Source code for weaver.sort

from weaver.base import Constants

[docs]class Sort(Constants):
[docs] CREATED = "created"
[docs] FINISHED = "finished"
[docs] STATUS = "status"
[docs] PROCESS = "process"
[docs] SERVICE = "service"
[docs] USER = "user"
[docs] QUOTE = "quote"
[docs] PRICE = "price"
[docs] ID = "id"
[docs] ID_LONG = "identifier" # long form employed by Processes in DB representation
[docs]class SortMethods(Constants):
[docs] PROCESS = frozenset([ Sort.ID, Sort.ID_LONG, # will replace by short ID to conform with JSON representation Sort.PROCESS, # since listing processes, can be an alias to ID Sort.CREATED,
[docs] JOB = frozenset([ Sort.CREATED, Sort.FINISHED, Sort.STATUS, Sort.PROCESS, Sort.SERVICE, Sort.USER,
[docs] QUOTE = frozenset([ Sort.ID, Sort.PROCESS, Sort.PRICE, Sort.CREATED,
[docs] BILL = frozenset([ Sort.ID, Sort.QUOTE, Sort.CREATED,