Fix Issue #7
The dispatcher now understand the concept of run status and will act
differently based on the current status of the run. This will prevent a
dispatcher from repeatedly publish jobs to the queue after it crashes
and restarted by the Kubernetes.
Additionally in this commit, major refactory is done to the dispatcher
to move logics closer to the data models.
Introduce a RabbitMq as the message broker to dispatch tasks. This is a
major overhaul of the internal architecture. As a result both a01droid
and a01dispatch underwent major overhaul.
After database lock is eliminated from the message broker equation,
there are fewer HTTP requests to the task store is needed. Tasks are not
added until it is actually executed. The controller job also stop
querying the tasks for run status update.
Many logics originally in the main.go are moved to be closer to the data
model or other utility package.