fix: setting last run when true
improve(dev): set mount volume to speed up dev container start
This commit is contained in:
parent
2971f5c709
commit
d9d1fe72d4
|
@ -1,6 +1,18 @@
|
|||
{
|
||||
"name": "Golang Dev",
|
||||
"image": "golang-dev:1.21-bookworm-user",
|
||||
"mounts": [
|
||||
{
|
||||
"source": "WingmateGoPath",
|
||||
"target": "/go",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "WingmateGolangDevHome",
|
||||
"target": "/home/golang",
|
||||
"type": "volume"
|
||||
}
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
/.idea
|
||||
/wingmate
|
||||
/cmd/wingmate/wingmate
|
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/wingmate.iml" filepath="$PROJECT_DIR$/.idea/wingmate.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1 +1 @@
|
|||
golang 1.21.4
|
||||
golang 1.21.5
|
||||
|
|
|
@ -28,14 +28,6 @@ type CronTimeSpec interface {
|
|||
Match(uint8) bool
|
||||
}
|
||||
|
||||
// type Cron interface {
|
||||
// Minute() CronTimeSpec
|
||||
// Hour() CronTimeSpec
|
||||
// DayOfMonth() CronTimeSpec
|
||||
// Month() CronTimeSpec
|
||||
// DayOfWeek() CronTimeSpec
|
||||
// }
|
||||
|
||||
type Cron struct {
|
||||
minute CronTimeSpec
|
||||
hour CronTimeSpec
|
||||
|
@ -149,6 +141,7 @@ func (c *Cron) TimeToRun(now time.Time) bool {
|
|||
c.dom.Match(uint8(now.Day())) &&
|
||||
c.month.Match(uint8(now.Month())) &&
|
||||
c.dow.Match(uint8(now.Weekday())) {
|
||||
c.lastRun = now
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue