devict / job-board Goto Github PK
View Code? Open in Web Editor NEWthe devICT job board!
Home Page: https://jobs.devict.org
the devICT job board!
Home Page: https://jobs.devict.org
I figured out how to address the problem of the worker waiting an hour to run at startup that I raised here: #17 (comment)
It was bothering me, so I thought about it a little bit and came up with this. I really like it. 😄
wg.Add(1)
go func() {
defer wg.Done()
ticker := time.NewTicker(time.Hour)
defer ticker.Stop()
for {
_, err := db.Exec("DELETE FROM jobs WHERE published_at < NOW() - INTERVAL '30 DAYS'")
if err != nil {
log.Println(fmt.Errorf("error clearing old jobs: %w", err))
}
select {
case <-ctx.Done():
log.Println("shutting down old jobs background process")
return
case <-ticker.C:
continue
}
}
}()
should be added to our main deploy action
Would be nice to see the newest job postings at the top of the index page rather than at the bottom. The query doesn't specify an order, so it just gets results back in index order.
Let's add ORDER BY published_at DESC
to the getAllJobs
func.
func getAllJobs(db *sqlx.DB) ([]Job, error) {
var jobs []Job
- err := db.Select(&jobs, "SELECT * FROM jobs")
+ err := db.Select(&jobs, "SELECT * FROM jobs ORDER BY published_at DESC")
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return jobs, err
}
return jobs, nil
}
We have had a few postings recently that did not have a URL, and the description had no contact information.
I'm guessing the assumption is their email will be available for contact?
Maybe we give users a checkbox allowing their email to be displayed on the posting?
possibly by requiring a verification email before posting goes live
when reviewing #13, I noticed that the validate
method was map[string]string
but the templates expect map[string][]string
(slice of strings per field) for the inline errors.
also, even after correcting that, the errors didn't seem to be displaying. my hunch is that there is something up with the flash messages.
What do you think if we add a search?
We're running on go1.18
, which will be unsupported when go1.20
is released next month (anticipated). We need to update Go to the latest version at the time someone picks up this issue.
Optionally, update the go.mod
file, and double-optionally, update dependencies.
When developing locally, it would be nice to have a script that adds dummy data to the database so that we can interact with it from the web for testing. ~50 rows will do.
After the latest deploy, there were some warnings.
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/Let's see what we can do to resolve them. 👍
Sorry @sethetter, I can't unsee it. ❤️
as long as they are posted by local commnuity members
enhance
local commnuity members
enhance
commnuity
👀 🤔
Also, there is a !.
at the end of the blurb: and ask away!.
And apparently Grammarly has some opinions about spaces around slashes.
This is a good one for a drive-by-contributor if you're okay with it staying up, haha. ❤️
I think that we could put answers to these questions inline in the form in order to make it easier for job posters:
Jim Rice
It says the Description is optional if no link is available. Will it always be used? I'd like to just put a few explainer lines in there, in addition to providing a link.
Jim Rice
Also, does this automatically post the job, or is there a review/approval/moderation step?
Jim Rice
Also Also - does my email get posted publicly?
I'm realizing now that I could probably answer that last one by reviewing other jobs on the board - but it was a question I asked myself as I hovered over the "Publish" button. (edited)
Seth Etter:adhoc: 1 day ago
Auto posts
Seth Etter:adhoc: 1 day ago
Email is not public — you are emailed an edit link
❤️
1
Seth Etter:adhoc: 1 day ago
Description is always used, even with a link, but only displays on the individual job post view page, like this one
Seth Etter:adhoc: 1 day ago
If a URL is provided, clicking the posting from the home page will take the user to that URL. But clicking the “Posted on YYYY/MM/DD” text under the posting will take them to the view page
Seth Etter:adhoc: 1 day ago
With no URL, both things will go to the view page
Seth Etter:adhoc: 1 day ago
(So there’s a good chance users won’t see the description if a URL is also provided unfortunately, unless they know to click that “Posted on …” link) (edited)
✅
1
This is happening locally, don't know if it's also happening in prd, but we're logging the tokens for editing a post.
job-board-app-1 | 2022/09/27 14:07:07 main.go:108: server listening on port :8080
job-board-app-1 | [GIN] 2022/09/27 - 14:07:16 | 200 | 8.339653ms | 172.19.0.1 | GET "/"
job-board-app-1 | [GIN] 2022/09/27 - 14:07:16 | 304 | 2.037051ms | 172.19.0.1 | GET "/assets/css/app.css"
job-board-app-1 | [GIN] 2022/09/27 - 14:07:16 | 304 | 2.724662ms | 172.19.0.1 | GET "/assets/svg/devict-logo.svg"
job-board-app-1 | [GIN] 2022/09/27 - 14:07:16 | 304 | 1.826482ms | 172.19.0.1 | GET "/assets/svg/circuit-board.svg"
job-board-app-1 | [GIN] 2022/09/27 - 14:07:16 | 404 | 3.887µs | 172.19.0.1 | GET "/favicon.ico"
job-board-app-1 | [GIN] 2022/09/27 - 14:07:19 | 200 | 2.62795ms | 172.19.0.1 | GET "/new"
job-board-app-1 | [GIN] 2022/09/27 - 14:08:01 | 302 | 1.061981724s | 172.19.0.1 | POST "/jobs"
job-board-app-1 | [GIN] 2022/09/27 - 14:08:01 | 200 | 4.1646ms | 172.19.0.1 | GET "/"
job-board-app-1 | [GIN] 2022/09/27 - 14:09:27 | 200 | 5.221391ms | 172.19.0.1 | GET "/jobs/54/edit?token=tvtxz2yUaSZsK4ewEuRR1wtOlGs%3D"
job-board-app-1 | [GIN] 2022/09/27 - 14:10:01 | 302 | 2.525355ms | 172.19.0.1 | POST "/jobs/54?token=tvtxz2yUaSZsK4ewEuRR1wtOlGs%3d"
job-board-app-1 | [GIN] 2022/09/27 - 14:10:01 | 200 | 3.684014ms | 172.19.0.1 | GET "/"
job-board-app-1 | [GIN] 2022/09/27 - 14:10:10 | 200 | 3.791154ms | 172.19.0.1 | GET "/jobs/54"
job-board-app-1 | [GIN] 2022/09/27 - 14:10:28 | 200 | 3.905699ms | 172.19.0.1 | GET "/jobs/54/edit?token=tvtxz2yUaSZsK4ewEuRR1wtOlGs%3D"
I think it might be nice to have auto tagging of jobs for things like crypto and web3 jobs. Then maybe users could filter or at least quickly see what type a job is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.