mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
parent
cafdcf2d93
commit
f16b3a57e8
@ -31,7 +31,7 @@ func (t *task) log(msg string) {
|
||||
}
|
||||
|
||||
go func() {
|
||||
_, err := database.Mysql.Exec("insert into task__output set task_id=?, output=?, time=?", t.task.ID, msg, now)
|
||||
_, err := database.Mysql.Exec("insert into task__output set task_id=?, task='', output=?, time=?", t.task.ID, msg, now)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ func (t *task) run() {
|
||||
now := time.Now()
|
||||
t.task.Status = "running"
|
||||
t.task.Start = &now
|
||||
|
||||
t.updateStatus()
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
alter table user change `created` `created` datetime not null default current_timestamp;
|
||||
alter table project change `created` `created` datetime not null default current_timestamp comment 'Created timestamp';
|
||||
alter table task change `created` `created` datetime not null default current_timestamp;
|
||||
alter table user__token change `created` `created` datetime not null default current_timestamp;
|
||||
alter table user change `created` `created` datetime not null;
|
||||
alter table project change `created` `created` datetime not null comment 'Created timestamp';
|
||||
alter table task change `created` `created` datetime not null;
|
||||
alter table user__token change `created` `created` datetime not null;
|
||||
|
||||
alter table task drop foreign key `task_ibfk_1`;
|
||||
alter table task add constraint `task_ibfk_1` foreign key (`template_id`) references `project__template` (`id`) on delete cascade;
|
2
make.sh
2
make.sh
@ -62,4 +62,4 @@ gox -os="linux darwin windows openbsd" -output="semaphore_{{.OS}}_{{.Arch}}" ./.
|
||||
if [ "$CIRCLE_ARTIFACTS" != "" ]; then
|
||||
rsync -a semaphore_* $CIRCLE_ARTIFACTS/
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
@ -13,7 +13,9 @@ type Project struct {
|
||||
}
|
||||
|
||||
func (project *Project) CreateProject() error {
|
||||
res, err := database.Mysql.Exec("insert into project set name=?", project.Name)
|
||||
project.Created = time.Now()
|
||||
|
||||
res, err := database.Mysql.Exec("insert into project set name=?, created=?", project.Name, project.Created)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -24,7 +26,6 @@ func (project *Project) CreateProject() error {
|
||||
}
|
||||
|
||||
project.ID = int(projectID)
|
||||
project.Created = time.Now()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user