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",
|
"name": "Golang Dev",
|
||||||
"image": "golang-dev:1.21-bookworm-user",
|
"image": "golang-dev:1.21-bookworm-user",
|
||||||
|
"mounts": [
|
||||||
|
{
|
||||||
|
"source": "WingmateGoPath",
|
||||||
|
"target": "/go",
|
||||||
|
"type": "volume"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "WingmateGolangDevHome",
|
||||||
|
"target": "/home/golang",
|
||||||
|
"type": "volume"
|
||||||
|
}
|
||||||
|
],
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
/.idea
|
/cmd/wingmate/wingmate
|
||||||
/wingmate
|
|
||||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -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
|
||||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -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>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
9
.idea/wingmate.iml
generated
Normal file
9
.idea/wingmate.iml
generated
Normal file
@ -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
|
Match(uint8) bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// type Cron interface {
|
|
||||||
// Minute() CronTimeSpec
|
|
||||||
// Hour() CronTimeSpec
|
|
||||||
// DayOfMonth() CronTimeSpec
|
|
||||||
// Month() CronTimeSpec
|
|
||||||
// DayOfWeek() CronTimeSpec
|
|
||||||
// }
|
|
||||||
|
|
||||||
type Cron struct {
|
type Cron struct {
|
||||||
minute CronTimeSpec
|
minute CronTimeSpec
|
||||||
hour CronTimeSpec
|
hour CronTimeSpec
|
||||||
@ -149,6 +141,7 @@ func (c *Cron) TimeToRun(now time.Time) bool {
|
|||||||
c.dom.Match(uint8(now.Day())) &&
|
c.dom.Match(uint8(now.Day())) &&
|
||||||
c.month.Match(uint8(now.Month())) &&
|
c.month.Match(uint8(now.Month())) &&
|
||||||
c.dow.Match(uint8(now.Weekday())) {
|
c.dow.Match(uint8(now.Weekday())) {
|
||||||
|
c.lastRun = now
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user